import { createRouter, createWebHistory } from 'vue-router';

const routes = [
  {
    path: '/',
    name: 'Home',
    title: '首页',
    component: () => import('@/views/layout.vue'),
    children: [
      {
        path: '/',
        name: 'map',
        component: () => import('@/views/index.vue'),
        redirect: '/map',
        children: [
          {
            path: '/map',
            name: 'map',
            title: '地图',
            component: () => import('@/components/china-map/my-map.vue'),
          },
          {
            path: '/job',
            name: 'job',
            title: '在线文档',
            component: () => import('@/views/job.vue'),
          },
          {
            path: '/markDown',
            name: 'markDown',
            title: 'markDown转Html',
            component: () => import('@/views/markdowm/index.vue'),
          },
        ],
      },
    ],
  },

  // {
  //   path: '/about',
  //   name: 'About',
  //   component: About,
  // },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
